package cn.newhopedairy.common.po;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 持久化数据对象类 - 父类
 *
 * @author Neo.Li
 * @date 2020-10-15
 */
@Setter
@Getter
public class SuperPo {

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 逻辑删除字段
     */
    @ApiModelProperty(value = "是否删除 0-否 1-是")
    @TableField("dr")
    @TableLogic
    private Integer dr;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_time")
    private LocalDateTime createdTime;

    @ApiModelProperty(value = "创建人")
    @TableField("created_by")
    private Integer createdBy;

    /**
     * 乐观锁字段
     */
    @ApiModelProperty(value = "更新时间")
    @TableField("updated_time")
    @Version
    private LocalDateTime updatedTime;

    @ApiModelProperty(value = "更新人")
    @TableField("updated_by")
    private Integer updatedBy;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

}
